<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">

<html>
<head>
    <meta charset="UTF-8">
    <title>追加评价</title>
    <link rel="stylesheet" href="/js/bootstrap.min.css">
    <script src="/js/jquery-3.2.1.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#button").click(function () {
                var newType = $("#addfrom form")[0];
                var formaDate = new FormData(newType);
                $.ajax({
                    url: "/applets/comment/doAdditional",
                    type: "post",
                    data: formaDate,
                    contentType: false,
                    processData: false,
                    success: function (data) {
                        alert(data.msg);
                    }
                });
                return false;
            });
        })

    </script>
</head>
<body>
<div class="container" id="addfrom">
    <h2 class="text-center">追加评价</h2>

    <!--导航-->
    <ul class="nav nav-tabs">
        <li class="nav-item">
            <a class="nav-link active" href="/KComment/ShowComment.html">返回展示界面</a>
        </li>
    </ul>

    <form action="#" method="post">
        <div class="form-group" hidden>
            <label>ID</label>
            <input type="text" class="form-control" name="id" th:value="${c.id}">
        </div>
        <div class="form-group">
            <label>追加评价</label>
            <input type="text" class="form-control" name="conent">
        </div>
        <div class="form-group">
            <input type="button" id="button" class="form-control" value="提交">
        </div>
    </form>

</div>

</body>
</html>